import {defineStore} from "pinia";
const useUserStore = defineStore('user',{
    state:()=>({
        user: {},
        login: false
    }),
    getters:{
        getUser(state){
            return state.user
        },
        isLogin(state){
            return state.login
        }
    },
    actions:{
        setUser(val){
            this.user = val
            this.login = true
        }
    },
    persist: true
})
export {useUserStore};